The container (Container) technology is a currently hot technology in cloud computing. It is a lightweight virtualization technology, where resources are isolated by means of process group management. Because containers have advantages such as easy deployment and fast startup, currently, many containers, such as Google App Engines (GAE), have been deployed in the Internet industry. Cloud computing providers such as Google and Redhat are all providing services based on the container technology. In recent years, a tendency to intensive container deployment has become more apparent. Hundreds of containers may be deployed on a physical machine, and more containers will be deployed with development of technologies. In most containers, a plurality of processes or threads is distributed.
To ensure reliability and serviceability (meaning that provision of a qualified service for an application in need can be ensured) of a container when the container runs, running statuses of the container and processes and threads in the container need to be monitored, to accurately learn of a problem occurring when the container runs, and resolve the problem by using a proper policy. The monitoring may specifically include monitoring the container, monitoring the processes in the container, and monitoring the threads in the container.
In the existing container monitoring method, because containers are deployed intensively and many processes and/or threads are distributed in the containers, to comprehensively monitor running statuses of the containers and the processes and threads in the containers, many resources need to be consumed, and performance of a physical machine is affected severely. Moreover, when the physical machine has a limited quantity of resources, a requirement for multidimensional monitoring on the containers cannot even be met.